import Vue from 'vue'
import store from './store'
import App from './App'
import Icon from '@/components/common/Icon/Icon.vue'
import calculation from './common/calculation'

Vue.prototype.$store = store
Vue.prototype.$calc = calculation
Vue.prototype.$api = {
  jump(url) {
    uni.navigateTo({ url })
  },
  back() {
    uni.navigateBack({})
  },
  alert(title) {
    uni.showToast({ title, icon: 'none' })
  },
  reload() {

  }
}
Vue.config.productionTip = false
Vue.component('Icon', Icon)
App.mpType = 'app'

const app = new Vue({
  ...App,
  store
})
app.$mount()

export {
  app
}
